package com.biz.primus.ms.search.feign;

import com.biz.primus.base.vo.search.ProductIdxVo;
import com.biz.primus.base.vo.commodity.ProductIdxIdentityVo;
import com.biz.primus.search.vo.search.ProductIdxReqVo;
import com.biz.primus.search.vo.search.ProductIdxRespVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(qualifier = "productIdxFeignClient", name = "service-product")
public interface ProductIdxFeignClient {


    @GetMapping("soa/productIdxService/tryLockMakeAllTypeBProductIndex")
    Boolean tryLockMakeAllTypeBProductIndex();

    @GetMapping("soa/productIdxService/unLockMakeAllTypeBProductIndex")
    void unLockMakeAllTypeBProductIndex();

    @PostMapping("soa/productIdxService/getProductIndices")
    ProductIdxRespVo getProductIndices(@RequestBody ProductIdxReqVo typeBReqVo);

    @PostMapping("soa/productIdxService/getSearchIdx")
    ProductIdxVo getSearchIdx(@RequestBody ProductIdxIdentityVo productIdxIdentityVo);

    @PostMapping("soa/productIdxService/getSearchIndices")
    List<ProductIdxVo> getSearchIndices(@RequestBody List<ProductIdxIdentityVo> vos);
}
